package com.example.bookstore.service;

import com.example.bookstore.entity.Address;
import com.example.bookstore.entity.People;
import com.example.bookstore.entity.ShopCart;
import org.apache.ibatis.annotations.Param;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Transactional
public interface PeopleService {

    People Login(String username, String password);

    Integer Register(String username,String password);

    People findByUserName(String username);

    ShopCart findByTwo(Integer uid, Integer id);

    Integer add(ShopCart shopCart);

    Integer updateByUidAndIid(Integer uid,Integer id);

    List<ShopCart> queryShopcart(Integer id);

    List<ShopCart> findSbAllShopCart(Integer id);

    Integer updateByUidAndIid2(Integer uid,Integer iid);

    Integer delete(Integer id);

    Integer setAddress(Integer userid,String address,String phone);

    Address findAddressByUserId(Integer id);

    Integer updateAddress(Integer id,String address,String phone);

    Integer deleteBook(Integer id);

    void cleanShopCart(Integer id);
}
